package com.atguigu.gulimall.ware.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("gulimall-product")
public interface ProductFeignService {
    /**
     * 两种请求方式
     * 1.让所有请求过网关
     *      (1)@FeignClient("gulimall-gateway")
     *      (2)@RequestMapping("/api/product/skuinfo/info/{skuId}")
     * 2.不过网关,直接让后台服务处理
     *      (1)@FeignClient("gulimall-product")
     *      (2)@RequestMapping("/product/skuinfo/info/{skuId}")
     */
    @RequestMapping("/product/skuinfo/info/{skuId}")
    public R info(@PathVariable("skuId") Long skuId);
}
